
#include <sstream>
#include <string>
#include <iostream>
using namespace std;


int main()
{
    stringstream ss("  1  2   3  4 5    ");

    
    bool flag = true;
    while(flag)
    {
        string tempStr;
        ss >> tempStr;
        if (tempStr=="")
        {
            flag = false;
        }

        if(tempStr!="")
            cout << tempStr<< endl;
        /*
         *int ttt;
         *cin >> ttt;
         */
    }
    return 1;
}

